3.9 \(\int (a+\frac {e x}{2}+c x^2)^p (2 a+e x+2 c x^2)^q \, dx\)

Optimal. Leaf size=136 \[ -\frac {2^{q+1} \left (-\frac {-\sqrt {e^2-16 a c}+4 c x+e}{\sqrt {e^2-16 a c}}\right )^{-p-q-1} \left (2 a+2 c x^2+e x\right )^{p+q+1} \, _2F_1\left (-p-q,p+q+1;p+q+2;\frac {e+4 c x+\sqrt {e^2-16 a c}}{2 \sqrt {e^2-16 a c}}\right )}{(p+q+1) \sqrt {e^2-16 a c}} \]

[Out]

-2^(1+q)*(2*c*x^2+e*x+2*a)^(1+p+q)*hypergeom([-p-q, 1+p+q],[2+p+q],1/2*(e+4*c*x+(-16*a*c+e^2)^(1/2))/(-16*a*c+
e^2)^(1/2))*((-e-4*c*x+(-16*a*c+e^2)^(1/2))/(-16*a*c+e^2)^(1/2))^(-1-p-q)/(1+p+q)/(-16*a*c+e^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {967, 624} \[ -\frac {2^{q+1} \left (-\frac {-\sqrt {e^2-16 a c}+4 c x+e}{\sqrt {e^2-16 a c}}\right )^{-p-q-1} \left (2 a+2 c x^2+e x\right )^{p+q+1} \, _2F_1\left (-p-q,p+q+1;p+q+2;\frac {e+4 c x+\sqrt {e^2-16 a c}}{2 \sqrt {e^2-16 a c}}\right )}{(p+q+1) \sqrt {e^2-16 a c}} \]

Antiderivative was successfully verified.

[In]

Int[(a + (e*x)/2 + c*x^2)^p*(2*a + e*x + 2*c*x^2)^q,x]

[Out]

-((2^(1 + q)*(-((e - Sqrt[-16*a*c + e^2] + 4*c*x)/Sqrt[-16*a*c + e^2]))^(-1 - p - q)*(2*a + e*x + 2*c*x^2)^(1
+ p + q)*Hypergeometric2F1[-p - q, 1 + p + q, 2 + p + q, (e + Sqrt[-16*a*c + e^2] + 4*c*x)/(2*Sqrt[-16*a*c + e
^2])])/(Sqrt[-16*a*c + e^2]*(1 + p + q)))

Rule 624

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, -Simp[((a + b*x + c*
x^2)^(p + 1)*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/(2*q)])/(q*(p + 1)*((q - b - 2*c*x)/(2*q))^(p
 + 1)), x]] /; FreeQ[{a, b, c, p}, x] && NeQ[b^2 - 4*a*c, 0] &&  !IntegerQ[4*p]

Rule 967

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.)*((d_) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_.), x_Symbol] :> Dist[(c/f)
^p, Int[(d + e*x + f*x^2)^(p + q), x], x] /; FreeQ[{a, b, c, d, e, f, p, q}, x] && EqQ[c*d - a*f, 0] && EqQ[b*
d - a*e, 0] && (IntegerQ[p] || GtQ[c/f, 0]) && ( !IntegerQ[q] || LeafCount[d + e*x + f*x^2] <= LeafCount[a + b
*x + c*x^2])

Rubi steps

\begin {align*} \int \left (a+\frac {e x}{2}+c x^2\right )^p \left (2 a+e x+2 c x^2\right )^q \, dx &=2^{-p} \int \left (2 a+e x+2 c x^2\right )^{p+q} \, dx\\ &=-\frac {2^{1+q} \left (-\frac {e-\sqrt {-16 a c+e^2}+4 c x}{\sqrt {-16 a c+e^2}}\right )^{-1-p-q} \left (2 a+e x+2 c x^2\right )^{1+p+q} \, _2F_1\left (-p-q,1+p+q;2+p+q;\frac {e+\sqrt {-16 a c+e^2}+4 c x}{2 \sqrt {-16 a c+e^2}}\right )}{\sqrt {-16 a c+e^2} (1+p+q)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 142, normalized size = 1.04 \[ \frac {2^{q-2} \left (-\sqrt {e^2-16 a c}+4 c x+e\right ) \left (\frac {\sqrt {e^2-16 a c}+4 c x+e}{\sqrt {e^2-16 a c}}\right )^{-p-q} (2 a+x (2 c x+e))^{p+q} \, _2F_1\left (-p-q,p+q+1;p+q+2;\frac {-e-4 c x+\sqrt {e^2-16 a c}}{2 \sqrt {e^2-16 a c}}\right )}{c (p+q+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + (e*x)/2 + c*x^2)^p*(2*a + e*x + 2*c*x^2)^q,x]

[Out]

(2^(-2 + q)*(e - Sqrt[-16*a*c + e^2] + 4*c*x)*((e + Sqrt[-16*a*c + e^2] + 4*c*x)/Sqrt[-16*a*c + e^2])^(-p - q)
*(2*a + x*(e + 2*c*x))^(p + q)*Hypergeometric2F1[-p - q, 1 + p + q, 2 + p + q, (-e + Sqrt[-16*a*c + e^2] - 4*c
*x)/(2*Sqrt[-16*a*c + e^2])])/(c*(1 + p + q))

________________________________________________________________________________________

fricas [F]  time = 0.91, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (2 \, c x^{2} + e x + 2 \, a\right )}^{q} {\left (c x^{2} + \frac {1}{2} \, e x + a\right )}^{p}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x, algorithm="fricas")

[Out]

integral((2*c*x^2 + e*x + 2*a)^q*(c*x^2 + 1/2*e*x + a)^p, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (2 \, c x^{2} + e x + 2 \, a\right )}^{q} {\left (c x^{2} + \frac {1}{2} \, e x + a\right )}^{p}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x, algorithm="giac")

[Out]

integrate((2*c*x^2 + e*x + 2*a)^q*(c*x^2 + 1/2*e*x + a)^p, x)

________________________________________________________________________________________

maple [F]  time = 0.25, size = 0, normalized size = 0.00 \[ \int \left (c \,x^{2}+\frac {1}{2} e x +a \right )^{p} \left (2 c \,x^{2}+e x +2 a \right )^{q}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x)

[Out]

int((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (2 \, c x^{2} + e x + 2 \, a\right )}^{q} {\left (c x^{2} + \frac {1}{2} \, e x + a\right )}^{p}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x, algorithm="maxima")

[Out]

integrate((2*c*x^2 + e*x + 2*a)^q*(c*x^2 + 1/2*e*x + a)^p, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (c\,x^2+\frac {e\,x}{2}+a\right )}^p\,{\left (2\,c\,x^2+e\,x+2\,a\right )}^q \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + (e*x)/2 + c*x^2)^p*(2*a + e*x + 2*c*x^2)^q,x)

[Out]

int((a + (e*x)/2 + c*x^2)^p*(2*a + e*x + 2*c*x^2)^q, x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+1/2*e*x+c*x**2)**p*(2*c*x**2+e*x+2*a)**q,x)

[Out]

Timed out

________________________________________________________________________________________